<?php declare(strict_types=1);

namespace Zyucv7\Components\DataAccess\Uxts\Project;

use Zyucv7\Components\DataAccess\BaseModel\Uxt;

/**
 * 优讯通项目表
 */
class Project extends Uxt
{
    
    /** @var string 主键字段名 */
    protected $primaryKey = 'proj_id';
    protected $table = 'project';

    /**
     * 根据名称获取
     *
     * @param string $name
     * @return Team|null
     */
    public function getByName(string $name)
    {
        return $this
            ->newQuery()
            ->where('proj_name', 'LIKE', '%' . $name . '%')
            ->first();
    }
}